<html lang="en"><head></head><body><form id="mainForm" method="post" action="https://embed.plnkr.co?show=preview" target="eplnkr"><input type="hidden" name="entries[vehicle.service.js][content]" value="(function() {
  'use strict';

  angular
    .module('app')
    .service('VehicleService', VehicleService);

  VehicleService.$inject = ['$http'];

  function VehicleService($http) {
    this.getVehicles = function() {
      return $http.get('api/vehicles.json')
        .then(function(response) {
          return response.data.data;
        })
        .catch(handleError);
    }

    function handleError() {

    }
  }
})();



/*
Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://bit.ly/l1cense
*/"><input type="hidden" name="entries[vehicle.service.js][encoding]" value="utf8"><input type="hidden" name="entries[vehicles.controller.js][content]" value="(function () {
  angular
    .module('app', [])
    .controller('VehiclesController', VehiclesController);

  VehiclesController.$inject = ['VehicleService'];
  function VehiclesController(VehicleService) {
    var vm = this;
    vm.title = 'Services';
    VehicleService.getVehicles()
      .then(function (vehicles) {
        vm.vehicles = vehicles;
      });
  }
})();



/*
Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://bit.ly/l1cense
*/"><input type="hidden" name="entries[vehicles.controller.js][encoding]" value="utf8"><input type="hidden" name="entries[index.html][content]" value="<!DOCTYPE html>
<html ng-app=&quot;app&quot;>

  <head>
    <meta charset=&quot;utf-8&quot; />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href=&quot;' + document.location + '&quot; />');</script>
    <script data-require=&quot;angular.js@1.4.x&quot; src=&quot;https://code.angularjs.org/1.4.8/angular.js&quot; data-semver=&quot;1.4.8&quot;></script>
    <script src=&quot;vehicles.controller.js&quot;></script>
    <script src=&quot;vehicle.service.js&quot;></script>
  </head>

  <body ng-controller=&quot;VehiclesController as vm&quot;>
    <h3>{{vm.title}}</h3>
    <ul>
      <li ng-repeat=&quot;vehicle in vm.vehicles&quot;>
        {{vehicle.name}}
      </li>
    </ul>
    <div ng-if=&quot;vm.vehicles.length&quot;>
      <h3>You have {{vm.vehicles.length}} vehicles</h3>
    </div>
  </body>

</html>


<!-- 
Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://bit.ly/l1cense
-->"><input type="hidden" name="entries[index.html][encoding]" value="utf8"><input type="hidden" name="entries[api/characters.json][content]" value="{
  &quot;data&quot;: [
    {
      &quot;id&quot;: 11,
      &quot;name&quot;: &quot;Chewbacca&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 12,
      &quot;name&quot;: &quot;Rey&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 13,
      &quot;name&quot;: &quot;Finn (FN2187)&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 14,
      &quot;name&quot;: &quot;Han Solo&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 15,
      &quot;name&quot;: &quot;Leia Organa&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 16,
      &quot;name&quot;: &quot;Luke Skywalker&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 17,
      &quot;name&quot;: &quot;Poe Dameron&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 18,
      &quot;name&quot;: &quot;Kylo Ren&quot;,
      &quot;side&quot;: &quot;dark&quot;
    },
    {
      &quot;id&quot;: 19,
      &quot;name&quot;: &quot;Supreme Commander Snoke&quot;,
      &quot;side&quot;: &quot;dark&quot;
    },
    {
      &quot;id&quot;: 20,
      &quot;name&quot;: &quot;R2-D2&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 21,
      &quot;name&quot;: &quot;BB8&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 22,
      &quot;name&quot;: &quot;C-3PO&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 23,
      &quot;name&quot;: &quot;Maz Kanata&quot;,
      &quot;side&quot;: &quot;light&quot;
    },
    {
      &quot;id&quot;: 24,
      &quot;name&quot;: &quot;Captain Phasma&quot;,
      &quot;side&quot;: &quot;dark&quot;
    },
    {
      &quot;id&quot;: 25,
      &quot;name&quot;: &quot;General Hux&quot;,
      &quot;side&quot;: &quot;dark&quot;
    },
    {
      &quot;id&quot;: 26,
      &quot;name&quot;: &quot;Lor San Tekka&quot;,
      &quot;side&quot;: &quot;light&quot;
    }
  ]
}"><input type="hidden" name="entries[api/characters.json][encoding]" value="utf8"><input type="hidden" name="entries[api/vehicles.json][content]" value="{
  &quot;data&quot;: [
    {
      &quot;id&quot;: 30,
      &quot;name&quot;: &quot;Millennium Falcon&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 32,
      &quot;name&quot;: &quot;X-Wing Fighter&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 33,
      &quot;name&quot;: &quot;Imperial Star Destroyer&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 34,
      &quot;name&quot;: &quot;AT-AT Walker&quot;,
      &quot;type&quot;: &quot;land&quot;
    },
    {
      &quot;id&quot;: 35,
      &quot;name&quot;: &quot;TIE Fighter&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 36,
      &quot;name&quot;: &quot;B-Wing Fighter&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 37,
      &quot;name&quot;: &quot;ETA-2 Jedi Starfighter&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 38,
      &quot;name&quot;: &quot;TIE Interceptor&quot;,
      &quot;type&quot;: &quot;space&quot;
    },
    {
      &quot;id&quot;: 39,
      &quot;name&quot;: &quot;X-34 Landspeeder&quot;,
      &quot;type&quot;: &quot;land&quot;
    },
    {
      &quot;id&quot;: 40,
      &quot;name&quot;: &quot;Snow Speeder&quot;,
      &quot;type&quot;: &quot;land&quot;
    },
    {
      &quot;id&quot;: 41,
      &quot;name&quot;: &quot;X-34 Landspeeder&quot;,
      &quot;type&quot;: &quot;land&quot;
    }
  ]
}"><input type="hidden" name="entries[api/vehicles.json][encoding]" value="utf8"><input type="hidden" name="tags[0]" value="angular2"><input type="hidden" name="tags[1]" value="example"><input type="hidden" name="tags[2]" value="first look"><input type="hidden" name="tags[3]" value="angular 1"><input type="hidden" name="title" value="Angular 2 Example - Angular 1 - Http"><input type="hidden" name="source[type]" value="Angular 1 - Http"><input type="hidden" name="source[url]" value="https://angular.io"><input type="hidden" name="entries[README.md][content]" value="### Angular 2 First Look Example 

Angular 1 - Http"><input type="hidden" name="entries[README.md][encoding]" value="utf8"><input type="hidden" name="entries[systemjs.config.js][content]" value="/**
 * PLUNKER VERSION
 * (based on systemjs.config.js in angular.io)
 * System configuration for Angular 2 samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
  System.config({
    // DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
    transpiler: 'ts',
    typescriptOptions: {
      tsconfig: true
    },
    meta: {
      'typescript': {
        &quot;exports&quot;: &quot;ts&quot;
      }
    },
    paths: {
      // paths serve as alias
      'npm:': 'https://unpkg.com/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',
      'main':                       'main.js', // PAPA

      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
      '@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',

      // other libraries
      'rxjs':                       'npm:rxjs',
      'angular-in-memory-web-api':  'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
      'ts':                         'npm:plugin-typescript@4.0.10/lib/plugin.js',
      'typescript':                 'npm:typescript@2.0.3/lib/typescript.js',

    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      'app/core': { main: 'index' }, // PAPA
      'app/models': { main: 'index' }, // PAPA
      'api': { defaultExtension: 'js' }, //PAPA
      app: {
        main: './main.ts',
        defaultExtension: 'ts'
      },
      rxjs: {
        defaultExtension: 'js'
      }
    }
  });
})(this);



/*
Copyright 2016 JohnPapa.net, LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://bit.ly/l1cense
*/"><input type="hidden" name="entries[systemjs.config.js][encoding]" value="utf8"><input type="hidden" name="entries[tsconfig.json][content]" value="{
  &quot;compilerOptions&quot;: {
    &quot;target&quot;: &quot;es5&quot;,
    &quot;module&quot;: &quot;commonjs&quot;,
    &quot;moduleResolution&quot;: &quot;node&quot;,
    &quot;sourceMap&quot;: true,
    &quot;emitDecoratorMetadata&quot;: true,
    &quot;experimentalDecorators&quot;: true,
    &quot;removeComments&quot;: false,
    &quot;noImplicitAny&quot;: false,
    &quot;suppressImplicitAnyIndexErrors&quot;: true
  }
}
"><input type="hidden" name="entries[tsconfig.json][encoding]" value="utf8"></form><script>document.getElementById("mainForm").submit();</script></body></html>